package com.epic;

import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;

public class ActivitySplashScreen extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_activity_splash_screen);
    }
    @Override
    protected void onResume() {
    	super.onResume();
    	SplashAsyn asyn = new SplashAsyn();
    	asyn.execute();
    }
   
    
    private class SplashAsyn extends AsyncTask<Void, Void, Void>{

		@Override
		protected Void doInBackground(Void... params) {
				try {
					Thread.sleep(500L);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			
			return null;
		}
		@Override
		protected void onPostExecute(Void result) {
			super.onPostExecute(result);
			Intent intent = new Intent(ActivitySplashScreen.this, 
					ActivityViewerImage.class);
			ActivitySplashScreen.this.startActivity(intent);
		}
    	
    }
    @Override
    protected void onStop() {
    	super.onStop();
    	this.finish();
    }
}

